home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_curl.idb / usr / freeware / catman / p_man / cat3 / curl_mprintf.Z / curl_mprintf
Text File  |  2002-07-08  |  5KB  |  97 lines

  1. curl_printf(3)          libcurl Manual       curl_printf(3)
  2.  
  3.  
  4.  
  5. NNAAMMEE
  6.        curl_maprintf,          curl_mfprintf,        curl_mprintf,
  7.        curl_msnprintf,    curl_msprintf  curl_mvaprintf,    curl_mvf
  8.        printf,    curl_mvprintf,    curl_mvsnprintf, curl_mvsprintf    -
  9.        formatted output    conversion
  10.  
  11. SSYYNNOOPPSSIISS
  12.        ##iinncclluuddee    <<ccuurrll//mmpprriinnttff..hh>>
  13.  
  14.        iinntt ccuurrll__mmpprriinnttff((ccoonnsstt cchhaarr **_f_o_r_m_a_t,, ......));;
  15.        iinntt ccuurrll__mmffpprriinnttff((FFIILLEE **_f_d,, ccoonnsstt cchhaarr **_f_o_r_m_a_t,, ......));;
  16.        iinntt ccuurrll__mmsspprriinnttff((cchhaarr **_b_u_f_f_e_r,, ccoonnsstt cchhaarr **_f_o_r_m_a_t,, ......));;
  17.        iinntt ccuurrll__mmssnnpprriinnttff((cchhaarr **_b_u_f_f_e_r,,    ssiizzee__tt    _m_a_x_l_e_n_g_t_h,,  ccoonnsstt
  18.        cchhaarr **_f_o_r_m_a_t,, ......));;
  19.        iinntt ccuurrll__mmvvpprriinnttff((ccoonnsstt cchhaarr **_f_o_r_m_a_t,, vvaa__lliisstt _a_r_g_s));;
  20.        iinntt  ccuurrll__mmvvffpprriinnttff((FFIILLEE     **_f_d,, ccoonnsstt cchhaarr **_f_o_r_m_a_t,, vvaa__lliisstt
  21.        _a_r_g_s));;
  22.        iinntt  ccuurrll__mmvvsspprriinnttff((cchhaarr     **_b_u_f_f_e_r,,  ccoonnsstt  cchhaarr     **_f_o_r_m_a_t,,
  23.        vvaa__lliisstt _a_r_g_s));;
  24.        iinntt  ccuurrll__mmvvssnnpprriinnttff((cchhaarr **_b_u_f_f_e_r,, ssiizzee__tt _m_a_x_l_e_n_g_t_h,, ccoonnsstt
  25.        cchhaarr **_f_o_r_m_a_t,, vvaa__lliisstt _a_r_g_s));;
  26.        cchhaarr **ccuurrll__mmaapprriinnttff((ccoonnsstt cchhaarr **_f_o_r_m_a_t,, ......));;
  27.        cchhaarr **ccuurrll__mmvvaapprriinnttff((ccoonnsstt cchhaarr **_f_o_r_m_a_t,,    vvaa__lliisstt    _a_r_g_s));;
  28.  
  29. DDEESSCCRRIIPPTTIIOONN
  30.        These are all functions that produces output according  to
  31.        a  format  string  and  given  arguments. These are mostly
  32.        clones of the well-known    C-style    functions and there  will
  33.        be  no  detailed     explanation  of all available formatting
  34.        rules and usage here.
  35.  
  36.        See this    table for notable exceptions.
  37.  
  38.           ccuurrll__mmpprriinnttff(())
  39.              Normal printf() clone.
  40.  
  41.           ccuurrll__mmffpprriinnttff(())
  42.              Normal fprinf() clone.
  43.  
  44.           ccuurrll__mmsspprriinnttff(())
  45.              Normal sprintf() clone.
  46.  
  47.           ccuurrll__mmssnnpprriinnttff(())
  48.              snprintf()    clone. Many  systems  don't  have
  49.              this.  It    is  just like sspprriinnttff but with an
  50.              extra argument after the buffer that  speci
  51.              fies the length of    the target buffer.
  52.  
  53.           ccuurrll__mmvvpprriinnttff(())
  54.              Normal vprintf() clone.
  55.  
  56.           ccuurrll__mmvvffpprriinnttff(())
  57.              Normal vfprintf() clone.
  58.  
  59.           ccuurrll__mmvvsspprriinnttff(())
  60.              Normal vsprintf() clone.
  61.  
  62.           ccuurrll__mmvvssnnpprriinnttff(())
  63.              vsnprintf()  clone.  Many systems don't have
  64.              this. It is just like vvsspprriinnttff but     with  an
  65.              extra  argument after the buffer that speci
  66.              fies the length of    the target buffer.
  67.  
  68.           ccuurrll__mmaapprriinnttff(())
  69.              Like printf() but returns the output  string
  70.              as     a malloc()ed string. The returned string
  71.              must be free()ed by the receiver.
  72.  
  73.           ccuurrll__mmvvaapprriinnttff(())
  74.              Like curl_maprintf()  but    takes  a  va_list
  75.              pointer   argument     instead  of  a     variable
  76.              amount of arguments.
  77.  
  78.        To easily use all these cloned functions     instead  of  the
  79.        normal  ones,  #define _MPRINTF_REPLACE before you include
  80.        the <curl/mprintf.h> file. Then all the normal names  like
  81.        printf,    fprintf,  sprintf etc will use the curl-functions
  82.        instead.
  83.  
  84. RREETTUURRNN VVAALLUUEE
  85.        The ccuurrll__mmaapprriinnttff and ccuurrll__mmvvaapprriinnttff  functions    return    a
  86.        pointer to a newly allocated string, or NULL it it failed.
  87.  
  88.        All other functions return the number  of  character  they
  89.        actually    outputed.
  90.  
  91. SSEEEE AALLSSOO
  92.        pprriinnttff(3), sspprriinnttff(3), ffpprriinnttff(3), vvpprriinnttff(3)
  93.  
  94.  
  95.  
  96. libcurl    7.7.2          20 April 2001           curl_printf(3)
  97.